<?php

namespace app\lmsx\validate;
use think\Validate;

/**
 * 资料分类验证
 * @author lan
 */
class Column extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|年级'  => 'require|max:25',
        'cid|科目'  => 'require',

    ];

    //定义验证提示
    protected $message = [
        'name.max' => '年级名称最多不能超过25个字符',
    ];

    //定义验证场景
    protected  $scene = [
        'edit' => ['cid'],
    ];
}
